package com.xiaoyung.easyisapisdk.feign.api.workflow;

import com.xiaoyung.easyisapisdk.common.base.IdParam;
import com.xiaoyung.easyisapisdk.common.base.IdsParam;
import com.xiaoyung.easyisapisdk.common.workflow.entity.ProcModelEntity;
import com.xiaoyung.easyisapisdk.common.workflow.request.ModelListQueryParam;

import feign.Headers;
import feign.RequestLine;

/**
 * 说明：工作流模型管理
 * 
 */
/*@Api(tags={"工作流模型"})
@ApiSupport(author = "Martin",order = 1)
@RestController
@RequestMapping("/openapi/model")*/
public interface ModelApi {


	/**
	 * 使用设计器 新增 或修改模型
	 */
	/*@ApiOperation(value = "保存流程模型")
	@ApiOperationSupport(order = 1, includeParameters = {"id,key,name,category,description,bpmnJson"})
	@PostMapping("/saveModel")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/model/saveModel")
	public ProcModelEntity saveModel(ProcModelEntity req) ;

	/**
	 * 流程模型 json
	 */
	/*@ApiOperation(value = "获取流程模型(用于流程编辑器)")
	@ApiOperationSupport(order = 2, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "modelId", value = "模型id", dataTypeClass = String.class, paramType = "query", required = true),
	})
	@GetMapping("/getModel")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/model/getModel")
	public ProcModelEntity getModel(IdParam req);

	/**
	 * 流程模型列表
	 */
	/*@ApiOperation(value = "流程模型列表")
	@ApiOperationSupport(order = 3, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "pageNum", value = "页码", dataTypeClass = Integer.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "pageSize", value = "页面大小", dataTypeClass = Integer.class, paramType = "query", required = false)
	})
	@GetMapping("/list")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/model/list")
	public ProcModelEntity list(ModelListQueryParam req);



	/**
	 * 删除
	 * 
	 */
	/*@ApiOperation(value = "删除模型")
	@ApiOperationSupport(order = 1, includeParameters = {})
	@PostMapping(value = "/delete", name = "删除流程模型")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/model/delete")
	public Void delete(IdsParam req);


	/**
	 * 部署流程定义
	 * 
	 */
	/*@ApiOperation(value = "部署模型")
	@ApiOperationSupport(order = 1, includeParameters = {})
	@PostMapping(value = "/deployment",name="部署模型")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/model/deployment")
	public Void deployment(IdParam req);

}
